package com.nodecollege.cloud.client.feign;

import com.nodecollege.cloud.client.fallback.TenantClientFallback;
import com.nodecollege.cloud.client.fallback.UserClientFallback;
import com.nodecollege.cloud.common.model.NCResult;
import com.nodecollege.cloud.common.model.QueryVO;
import com.nodecollege.cloud.common.model.po.UpmsTenant;
import com.nodecollege.cloud.common.model.po.UpmsUser;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author LC
 * @date 2020/1/10 9:47
 */
@Primary
@FeignClient(value = "UPMS", path = "/user", fallback = UserClientFallback.class)
public interface UserClient {

    @PostMapping("/getUserListByQuery")
    NCResult<UpmsUser> getUserListByQuery(@RequestBody QueryVO queryVO);

    @PostMapping("/getUserByUserId")
    NCResult<UpmsUser> getUserByUserId(@RequestBody Long userId);
}
